home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 January - Disc 2 / Macworld (1999-01) (Disk 2).dmg / Serious Demos / Symbolic Composer 4.2 / Environment / Projects / Questions & Answers / Q&A Programming Music / Positioning events in time < prev    next >
Text File  |  1998-10-26  |  1KB  |  50 lines

  1. POSITIONING EVENTS IN TIME
  2.  
  3. ; Each instrument starts playing when a specified number of bars 
  4. ; (or other time units have passed).
  5. ; instr3 consists of two partials which both play to the same channel
  6. ; that shows you have to make an instrument that will appear playing
  7. ; in multiple time positions.
  8. ; Each intrument or partial plays then the amount of determined by the
  9. ; next zone. In the example all instruments use the same class slot 
  10. ; values, but you can individualize each instrument with their own
  11. ; values. If you want instr3 partials to play same material in different 
  12. ; time positions then you would just define the class slots
  13. ; for inst3 (like channel 4 definition). Learn to use inheritance.
  14. ; Each partial will show on a different MIDI track but they will play
  15. ; to the same channel. Your sequencer probably allows to mix them
  16. ; into one track if you later want to notate your score.
  17.  
  18. (def-orchestra 'orchestra
  19.    all-instruments (group)
  20.    group (inst1 inst2 inst3)
  21.    inst3 (inst3-partial1 inst3-partial2)
  22. )
  23.  
  24. (def-section sect-a
  25.     all-instruments
  26.       symbol '(a b c)
  27.       length '(1/16)
  28.       velocity '(64)
  29.       tonality (activate-tonality (major c 4))
  30.    inst1
  31.       channel 2
  32.       zone '(-2/1 2/1)
  33.    inst2
  34.       channel 3
  35.       zone '(-3/1 2/1)
  36.    inst3
  37.       channel 4
  38.    inst3-partial1
  39.       zone '(-1/1 2/1)
  40.    inst3-partial2
  41.       zone '(-5/1 2/1)
  42. )
  43.  
  44. (def-tempo 120)
  45.  
  46. (play-file-p "my song"
  47.    all-instruments '(sect-a)
  48. )
  49.  
  50.